package cn.strutsDemo.util;

import com.opensymphony.xwork2.ActionContext;

import java.util.Map;

public class BaseAction {
    //获取request
    public static Map<String,Object> getRequest(){
        return (Map<String, Object>) ActionContext.getContext().get("request");
    }
    //获取session
    public static Map<String,Object> getSession(){
        return (Map<String, Object>) ActionContext.getContext().getSession();
    }
    //获取application
    public static Map<String,Object> getAppliction(){
        return (Map<String, Object>) ActionContext.getContext().getApplication();
    }
}
